#ifndef _XSS_H
#define _XSS_H

#include <unistd.h>

#define ENTRYSIZE 1024

struct xs_sock {
    struct xs_handle *xsh;
    unsigned int domid;
    char addr[ENTRYSIZE];
};

struct xs_sock *xss_open(char *addr);

int xss_close(struct xs_sock *sock);

ssize_t xss_sendto(struct xs_sock *sock, void *buf, size_t len, struct xs_sock *dest_sock);

ssize_t xss_recvfrom(struct xs_sock *sock, void *buf, size_t len, struct xs_sock *src_sock);

#endif /* _XSS_H */
